import { watch } from 'vue'
import { useLoginStore } from "@/stores/useLoginStore";
const store = useLoginStore();
 
// 监视语言变化并执行回调函数
export const watchLang = (...cbs) => {
  watch(
    () => store.lang,
    () => {
      cbs.forEach((cb) => cb(store.lang))
    },
    { deep: true }
  )
  
}